home *** CD-ROM | disk | FTP | other *** search
/ The Trig Explorer / The Trig Explorer.iso / mac / Explorer / DEGREE1.dxr / 00046.ls < prev    next >
Encoding:
Text File  |  1998-07-22  |  472 b   |  26 lines

  1. on startMovie
  2.   cursor(-1)
  3.   set the keyDownScript to "printPass"
  4.   set the keyUpScript to "numsOnly"
  5. end
  6.  
  7. on stopMovie
  8.   put 45 into field "Answer"
  9. end
  10.  
  11. on numsOnly
  12.   if (the key = RETURN) or (the key = ENTER) or (the key = TAB) or (the key = "-") or (the keyCode = 76) then
  13.     exit
  14.   end if
  15.   if (the key >= "0") and (the key <= "9") then
  16.     exit
  17.   end if
  18.   if the key = "." then
  19.     exit
  20.   end if
  21.   if the key = BACKSPACE then
  22.     exit
  23.   end if
  24.   dontPassEvent()
  25. end
  26.